package org.qydjk.common.pojo;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

@Entity
@Table(name = "qy_coupon", schema = "qydjk", catalog = "")
public class Coupon {
    private Integer id;
    private String name;
    private String intro;
    private Integer providerType;
    private Integer suitType;
    private Integer type;
    private String suitPlatformCategory;
    private String suitPlatformSeller;
    private String suitPlatformProduct;
    private String suitSellerId;
    private String suitSellerProduct;
    private String excludeCategory;
    private String excludeSeller;
    private String excludeProduct;
    private BigDecimal subtractionMoney;
    private BigDecimal money;
    private BigDecimal discount;
    private BigDecimal maxDiscountMoney;
    private Integer repertory;
    private Integer remainRepertory;
    private Date startTime;
    private Date endTime;
    private Date createTime;
    private Date updateTime;
    private Integer receive;
    private Integer dayReceive;
    private Integer status;
    private Integer system;
    private Integer platform;
    private String detail;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "intro")
    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    @Basic
    @Column(name = "provider_type")
    public Integer getProviderType() {
        return providerType;
    }

    public void setProviderType(Integer providerType) {
        this.providerType = providerType;
    }

    @Basic
    @Column(name = "suit_type")
    public Integer getSuitType() {
        return suitType;
    }

    public void setSuitType(Integer suitType) {
        this.suitType = suitType;
    }

    @Basic
    @Column(name = "type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Basic
    @Column(name = "suit_platform_category")
    public String getSuitPlatformCategory() {
        return suitPlatformCategory;
    }

    public void setSuitPlatformCategory(String suitPlatformCategory) {
        this.suitPlatformCategory = suitPlatformCategory;
    }

    @Basic
    @Column(name = "suit_platform_seller")
    public String getSuitPlatformSeller() {
        return suitPlatformSeller;
    }

    public void setSuitPlatformSeller(String suitPlatformSeller) {
        this.suitPlatformSeller = suitPlatformSeller;
    }

    @Basic
    @Column(name = "suit_platform_product")
    public String getSuitPlatformProduct() {
        return suitPlatformProduct;
    }

    public void setSuitPlatformProduct(String suitPlatformProduct) {
        this.suitPlatformProduct = suitPlatformProduct;
    }

    @Basic
    @Column(name = "suit_seller_id")
    public String getSuitSellerId() {
        return suitSellerId;
    }

    public void setSuitSellerId(String suitSellerId) {
        this.suitSellerId = suitSellerId;
    }

    @Basic
    @Column(name = "suit_seller_product")
    public String getSuitSellerProduct() {
        return suitSellerProduct;
    }

    public void setSuitSellerProduct(String suitSellerProduct) {
        this.suitSellerProduct = suitSellerProduct;
    }

    @Basic
    @Column(name = "exclude_category")
    public String getExcludeCategory() {
        return excludeCategory;
    }

    public void setExcludeCategory(String excludeCategory) {
        this.excludeCategory = excludeCategory;
    }

    @Basic
    @Column(name = "exclude_seller")
    public String getExcludeSeller() {
        return excludeSeller;
    }

    public void setExcludeSeller(String excludeSeller) {
        this.excludeSeller = excludeSeller;
    }

    @Basic
    @Column(name = "exclude_product")
    public String getExcludeProduct() {
        return excludeProduct;
    }

    public void setExcludeProduct(String excludeProduct) {
        this.excludeProduct = excludeProduct;
    }

    @Basic
    @Column(name = "subtraction_money")
    public BigDecimal getSubtractionMoney() {
        return subtractionMoney;
    }

    public void setSubtractionMoney(BigDecimal subtractionMoney) {
        this.subtractionMoney = subtractionMoney;
    }

    @Basic
    @Column(name = "money")
    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    @Basic
    @Column(name = "discount")
    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    @Basic
    @Column(name = "max_discount_money")
    public BigDecimal getMaxDiscountMoney() {
        return maxDiscountMoney;
    }

    public void setMaxDiscountMoney(BigDecimal maxDiscountMoney) {
        this.maxDiscountMoney = maxDiscountMoney;
    }

    @Basic
    @Column(name = "repertory")
    public Integer getRepertory() {
        return repertory;
    }

    public void setRepertory(Integer repertory) {
        this.repertory = repertory;
    }

    @Basic
    @Column(name = "remain_repertory")
    public Integer getRemainRepertory() {
        return remainRepertory;
    }

    public void setRemainRepertory(Integer remainRepertory) {
        this.remainRepertory = remainRepertory;
    }

    @Basic
    @Column(name = "start_time")
    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    @Basic
    @Column(name = "end_time")
    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "receive")
    public Integer getReceive() {
        return receive;
    }

    public void setReceive(Integer receive) {
        this.receive = receive;
    }

    @Basic
    @Column(name = "day_receive")
    public Integer getDayReceive() {
        return dayReceive;
    }

    public void setDayReceive(Integer dayReceive) {
        this.dayReceive = dayReceive;
    }

    @Basic
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "system")
    public Integer getSystem() {
        return system;
    }

    public void setSystem(Integer system) {
        this.system = system;
    }

    @Basic
    @Column(name = "platform")
    public Integer getPlatform() {
        return platform;
    }

    public void setPlatform(Integer platform) {
        this.platform = platform;
    }

    @Basic
    @Column(name = "detail")
    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Coupon coupon = (Coupon) o;

        if (id != null ? !id.equals(coupon.id) : coupon.id != null) return false;
        if (name != null ? !name.equals(coupon.name) : coupon.name != null) return false;
        if (intro != null ? !intro.equals(coupon.intro) : coupon.intro != null) return false;
        if (providerType != null ? !providerType.equals(coupon.providerType) : coupon.providerType != null)
            return false;
        if (suitType != null ? !suitType.equals(coupon.suitType) : coupon.suitType != null) return false;
        if (type != null ? !type.equals(coupon.type) : coupon.type != null) return false;
        if (suitPlatformCategory != null ? !suitPlatformCategory.equals(coupon.suitPlatformCategory) : coupon.suitPlatformCategory != null)
            return false;
        if (suitPlatformSeller != null ? !suitPlatformSeller.equals(coupon.suitPlatformSeller) : coupon.suitPlatformSeller != null)
            return false;
        if (suitPlatformProduct != null ? !suitPlatformProduct.equals(coupon.suitPlatformProduct) : coupon.suitPlatformProduct != null)
            return false;
        if (suitSellerId != null ? !suitSellerId.equals(coupon.suitSellerId) : coupon.suitSellerId != null)
            return false;
        if (suitSellerProduct != null ? !suitSellerProduct.equals(coupon.suitSellerProduct) : coupon.suitSellerProduct != null)
            return false;
        if (excludeCategory != null ? !excludeCategory.equals(coupon.excludeCategory) : coupon.excludeCategory != null)
            return false;
        if (excludeSeller != null ? !excludeSeller.equals(coupon.excludeSeller) : coupon.excludeSeller != null)
            return false;
        if (excludeProduct != null ? !excludeProduct.equals(coupon.excludeProduct) : coupon.excludeProduct != null)
            return false;
        if (subtractionMoney != null ? !subtractionMoney.equals(coupon.subtractionMoney) : coupon.subtractionMoney != null)
            return false;
        if (money != null ? !money.equals(coupon.money) : coupon.money != null) return false;
        if (discount != null ? !discount.equals(coupon.discount) : coupon.discount != null) return false;
        if (maxDiscountMoney != null ? !maxDiscountMoney.equals(coupon.maxDiscountMoney) : coupon.maxDiscountMoney != null)
            return false;
        if (repertory != null ? !repertory.equals(coupon.repertory) : coupon.repertory != null) return false;
        if (remainRepertory != null ? !remainRepertory.equals(coupon.remainRepertory) : coupon.remainRepertory != null)
            return false;
        if (startTime != null ? !startTime.equals(coupon.startTime) : coupon.startTime != null) return false;
        if (endTime != null ? !endTime.equals(coupon.endTime) : coupon.endTime != null) return false;
        if (createTime != null ? !createTime.equals(coupon.createTime) : coupon.createTime != null) return false;
        if (updateTime != null ? !updateTime.equals(coupon.updateTime) : coupon.updateTime != null) return false;
        if (receive != null ? !receive.equals(coupon.receive) : coupon.receive != null) return false;
        if (dayReceive != null ? !dayReceive.equals(coupon.dayReceive) : coupon.dayReceive != null) return false;
        if (status != null ? !status.equals(coupon.status) : coupon.status != null) return false;
        if (system != null ? !system.equals(coupon.system) : coupon.system != null) return false;
        if (platform != null ? !platform.equals(coupon.platform) : coupon.platform != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (intro != null ? intro.hashCode() : 0);
        result = 31 * result + (providerType != null ? providerType.hashCode() : 0);
        result = 31 * result + (suitType != null ? suitType.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (suitPlatformCategory != null ? suitPlatformCategory.hashCode() : 0);
        result = 31 * result + (suitPlatformSeller != null ? suitPlatformSeller.hashCode() : 0);
        result = 31 * result + (suitPlatformProduct != null ? suitPlatformProduct.hashCode() : 0);
        result = 31 * result + (suitSellerId != null ? suitSellerId.hashCode() : 0);
        result = 31 * result + (suitSellerProduct != null ? suitSellerProduct.hashCode() : 0);
        result = 31 * result + (excludeCategory != null ? excludeCategory.hashCode() : 0);
        result = 31 * result + (excludeSeller != null ? excludeSeller.hashCode() : 0);
        result = 31 * result + (excludeProduct != null ? excludeProduct.hashCode() : 0);
        result = 31 * result + (subtractionMoney != null ? subtractionMoney.hashCode() : 0);
        result = 31 * result + (money != null ? money.hashCode() : 0);
        result = 31 * result + (discount != null ? discount.hashCode() : 0);
        result = 31 * result + (maxDiscountMoney != null ? maxDiscountMoney.hashCode() : 0);
        result = 31 * result + (repertory != null ? repertory.hashCode() : 0);
        result = 31 * result + (remainRepertory != null ? remainRepertory.hashCode() : 0);
        result = 31 * result + (startTime != null ? startTime.hashCode() : 0);
        result = 31 * result + (endTime != null ? endTime.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        result = 31 * result + (receive != null ? receive.hashCode() : 0);
        result = 31 * result + (dayReceive != null ? dayReceive.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (system != null ? system.hashCode() : 0);
        result = 31 * result + (platform != null ? platform.hashCode() : 0);
        return result;
    }

}
